<?php $this->_extends('../_layouts/mobile_layout'); ?>
<?php $this->_block('contents'); ?>
<div data-role="content" style="padding: 5px 0px 5px 0px">
	<div style="text-align:center">
    	<a href="<?=url('Purchase::Order/MobileOrderList', array('current_user_id' => $current_user_id))?>" data-role="button" data-theme="a" data-inline="true">我的采购单</a>
    	<a href="<?=url('Purchase::Order/MobileOrderList')?>" data-role="button" data-theme="a" data-inline="true">全部采购单</a>
	</div>
	<ul data-role="listview" data-inset="true">
	<?foreach ($purchase_order as $key => $po):?>
		<li data-role="list-divider"><?=$po['number']?></li>
		<li><a href="<?=url('Purchase::Order/MobileDetail', array('id' => $po['id']))?>">
			<p>【采购日期】<strong><?=isset($po['purchase_time']) ? date('Y-m-d', strtotime($po['purchase_time'])) : ''?></strong></p>
			<p>【采购人】<strong><?=$po['purchase_user_name']?></strong></p>
			<p>【状态】<strong><?=Helper_BSS_Normal::getIniOne('purchase_order_status', 'value', $po['status'], 'name')?></strong></p>
		</a></li>
	<?endforeach;?>
	</ul>
</div>
<div data-role="footer" class="ui-bar" data-theme="b" data-position="fixed">
	<div data-role="controlgroup" data-type="horizontal" style="text-align:center;" >
		<a href="<?=$url . '&cp=' . $page['prev'] ?>" data-role="button" data-icon="arrow-l">上一页</a>
		<a><?=$page['current']?>/<?=$page['page_count']?></a>
		<a href="<?=$url . '&cp=' . $page['next'] ?>" data-role="button" data-icon="arrow-r" data-iconpos="right">下一页</a>
	</div>
</div>
<?php $this->_endblock(); ?>